#!/bin/sh

/bin/echo "Modify kernel params ..."
echo "1024"  > /proc/sys/net/ipv4/neigh/default/gc_thresh1
echo "2048"  > /proc/sys/net/ipv4/neigh/default/gc_thresh2
echo "8192"  > /proc/sys/net/ipv4/neigh/default/gc_thresh3
echo "10" > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_syn_sent
echo "10" > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_syn_recv
echo "30" > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_fin_wait
echo "30" > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_time_wait
echo "10" > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_close_wait
echo "10" > /proc/sys/net/ipv4/netfilter/ip_conntrack_icmp_timeout

echo 8192 > /proc/sys/fs/file-max
echo 1 > /proc/sys/net/ipv4/tcp_abort_on_overflow
echo 4096 > /proc/sys/net/ipv4/tcp_max_orphans
echo 20480 > /proc/sys/net/ipv4/tcp_max_tw_buckets
echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse
echo 7200 > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_established
echo 1 > /proc/sys/net/ipv4/tcp_syncookies
echo 1 > /proc/sys/net/ipv4/ip_forward
